//
//  AlbumChildTableViewCell.m
//  艾听歌
//
//  Created by dllo on 16/5/29.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AlbumChildTableViewCell.h"

@implementation AlbumChildTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imgView];
        self.nameLabel = [[UILabel alloc] init];
        self.nameLabel.font = [UIFont systemFontOfSize:22];
        [self.contentView addSubview:self.nameLabel];
        self.detailLabel = [[UILabel alloc] init];
        self.detailLabel.font = [UIFont systemFontOfSize:15];
        self.detailLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:self.detailLabel];
           }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(20, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10);
    self.nameLabel.frame = CGRectMake(CGRectGetMaxX(self.imgView.frame) + 15, 10, self.contentView.frame.size.width - CGRectGetMaxX(self.imgView.frame) - 35, 30);
    self.detailLabel.frame = CGRectMake(self.nameLabel.frame.origin.x, CGRectGetMaxY(self.nameLabel.frame) + 5, self.nameLabel.frame.size.width, 25);
}



@end
